/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
 * TrainingBook
 * Copyright (C) Arnaud Duval 2010 <arnaud.duval@gmail.com>
 * 
 * Projects is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Projects is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef _ACTIVITY_NOTEBOOK_HPP_
#define _ACTIVITY_NOTEBOOK_HPP_

#include <gtkmm.h>
#include <Activity.hpp>

///@class ActivityNotebook
///@brief A notebook to plot detail about an activity
class ActivityNotebook : public Gtk::Notebook
{
    public:
        ///@brief Default constructor
        ActivityNotebook();
        ///@brief Destructor
        virtual ~ActivityNotebook();
        ///@brief Set the pointer to activity in edition
        void SetActivity(Activity*);
        ///@brief Return true if the activity has been modified
        bool HaveModification();
        ///@brief Refresh the content of the notebook with the current activity
        void Refresh();
        ///@brief Say to the notebook that the activity have no pending modifications
        void SetNoModif();
        

    protected:
        ///@brief Action when clicking on the button to recompute the average power of selected activity
        void on_button_recompute_av_power_clicked();
    
    private:
        ///@brief A VBox for activity summary (global display VBox)
        Gtk::VBox summaryVBox;
        ///@brief A Vbox for activity totals
        Gtk::VBox sumTotalsVBox;
        ///@brief A VBox for averages
        Gtk::VBox sumAveragesVBox;
        ///@brief A VBox for metrics
        Gtk::VBox sumMetricsVBox;
        ///@brief A HBox to make 3 columns
        Gtk::HBox sum3ColumnsHBox;
        
        ///@brief A VBox for intervales
        Gtk::VBox sumIntervalesVBox;
        
        ///@brief A label to display "Totals" column title
        Gtk::Label sumTotalsColumnLabel;
        ///@brief A label to display "Averages" column title
        Gtk::Label sumAveragesColumnLabel;
        ///@brief A label to display "Metrics" column title
        Gtk::Label sumMetricsColumnLabel;
        
        
        ///@brief A label to diplay the date
        Gtk::Label sumDateLabel;
        ///@brief A label to display the location
        Gtk::Label sumLocationLabel;
        ///@brief A label to display the distance
        Gtk::Label sumDistanceLabel;
        ///@brief A label to display the duration
        Gtk::Label sumDurationLabel;
        ///@brief A label to display the average cadence
        Gtk::Label sumAvgCadenceLabel;
        ///@brief A label to display the average power
        Gtk::Label sumAvgPowerLabel;
        ///@brief A label to display the average heart rate
        Gtk::Label sumAvgHRLabel;


        
        
        ///@brief A button to recompute the average power
        Gtk::Button recomputeAvPowerButton;
        
        
        
        
        
        
        ///@brief A VBox for the map
        Gtk::VBox mapVBox;
        ///@brief A VBox for the editor
        Gtk::VBox editorVBox;
        
        ///@brief Pointer to activity in edition
        Activity *activity;
        ///@brief Boolean indicating if modifications have been done on the activity in edition
        bool haveModifs;
            




};



#endif
